package User_index;

import java.sql.ResultSet;
import java.sql.SQLException;

import MYJDBC.jdbc;

public class Video_Play {
	
	
//	视频对象获取
	public Video_dao VideoSelect(int id) throws SQLException {
		
		
		
		jdbc jc = new jdbc();
		Video_dao vio = new Video_dao();
		ResultSet rs = jc.SqlRs("select * from video_table where videoid = "+id+"");
		while(rs.next()) {
			vio.setVideoid(rs.getInt("videoid"));
			vio.setVideoname(rs.getString("videoname"));
			vio.setVideosrc(rs.getString("videosrc"));
			vio.setVideoimg(rs.getString("videoimg"));
			vio.setVideotext(rs.getString("videotext"));
			vio.setUserid(rs.getInt("user_id"));
			vio.setVideogoodjob(rs.getInt("videogoodjob"));
		}
		
		jc.QueryClose();
		
		return vio; 
	}

}
